/*
Adept MobileRobots Robotics Interface for Applications (ARIA)
Copyright (C) 2004-2005 ActivMedia Robotics LLC
Copyright (C) 2006-2010 MobileRobots Inc.
Copyright (C) 2011-2015 Adept Technology, Inc.
Copyright (C) 2016-2018 Omron Adept Technologies, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

If you wish to redistribute ARIA under different terms, contact 
Adept MobileRobots for information about a commercial version of ARIA at 
robots@mobilerobots.com or 
Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960
*/
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.8
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.mobilerobots.Aria;

public class ArMapObject {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  public ArMapObject(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(ArMapObject obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        AriaJavaJNI.delete_ArMapObject(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public static ArMapObject createMapObject(ArArgumentBuilder arg) {
    long cPtr = AriaJavaJNI.ArMapObject_createMapObject(ArArgumentBuilder.getCPtr(arg), arg);
    return (cPtr == 0) ? null : new ArMapObject(cPtr, false);
  }

  public ArMapObject(String type, ArPose pose, String description, String iconName, String name, boolean hasFromTo, ArPose fromPose, ArPose toPose) {
    this(AriaJavaJNI.new_ArMapObject__SWIG_0(type, ArPose.getCPtr(pose), pose, description, iconName, name, hasFromTo, ArPose.getCPtr(fromPose), fromPose, ArPose.getCPtr(toPose), toPose), true);
  }

  public ArMapObject(ArMapObject mapObject) {
    this(AriaJavaJNI.new_ArMapObject__SWIG_1(ArMapObject.getCPtr(mapObject), mapObject), true);
  }

  public String getType() {
    return AriaJavaJNI.ArMapObject_getType(swigCPtr, this);
  }

  public String getBaseType() {
    return AriaJavaJNI.ArMapObject_getBaseType(swigCPtr, this);
  }

  public String getName() {
    return AriaJavaJNI.ArMapObject_getName(swigCPtr, this);
  }

  public String getDescription() {
    return AriaJavaJNI.ArMapObject_getDescription(swigCPtr, this);
  }

  public String getIconName() {
    return AriaJavaJNI.ArMapObject_getIconName(swigCPtr, this);
  }

  public int getId() {
    return AriaJavaJNI.ArMapObject_getId(swigCPtr, this);
  }

  public void setDescription(String description) {
    AriaJavaJNI.ArMapObject_setDescription(swigCPtr, this, description);
  }

  public ArPose getPose() {
    return new ArPose(AriaJavaJNI.ArMapObject_getPose(swigCPtr, this), true);
  }

  public boolean hasFromTo() {
    return AriaJavaJNI.ArMapObject_hasFromTo(swigCPtr, this);
  }

  public ArPose getFromPose() {
    return new ArPose(AriaJavaJNI.ArMapObject_getFromPose(swigCPtr, this), true);
  }

  public ArPose getToPose() {
    return new ArPose(AriaJavaJNI.ArMapObject_getToPose(swigCPtr, this), true);
  }

  public void setPose(ArPose p) {
    AriaJavaJNI.ArMapObject_setPose(swigCPtr, this, ArPose.getCPtr(p), p);
  }

  public void setFromTo(ArPose from, ArPose to) {
    AriaJavaJNI.ArMapObject_setFromTo(swigCPtr, this, ArPose.getCPtr(from), from, ArPose.getCPtr(to), to);
  }

  public double getFromToRotation() {
    return AriaJavaJNI.ArMapObject_getFromToRotation(swigCPtr, this);
  }

  public ArLineSegmentList getFromToSegments() {
    return new ArLineSegmentList(AriaJavaJNI.ArMapObject_getFromToSegments(swigCPtr, this), true);
  }

  public ArLineSegment getFromToSegment() {
    return new ArLineSegment(AriaJavaJNI.ArMapObject_getFromToSegment(swigCPtr, this), true);
  }

  public ArPose findCenter() {
    return new ArPose(AriaJavaJNI.ArMapObject_findCenter(swigCPtr, this), true);
  }

  public boolean isPointInside(ArPose p) {
    return AriaJavaJNI.ArMapObject_isPointInside(swigCPtr, this, ArPose.getCPtr(p), p);
  }

  public ArPoseVector getRegionVertices() {
    return new ArPoseVector(AriaJavaJNI.ArMapObject_getRegionVertices(swigCPtr, this), true);
  }

  public String toString() {
    return AriaJavaJNI.ArMapObject_toString(swigCPtr, this);
  }

  public String getStringRepresentation() {
    return AriaJavaJNI.ArMapObject_getStringRepresentation(swigCPtr, this);
  }

  public void log(String intro) {
    AriaJavaJNI.ArMapObject_log__SWIG_0(swigCPtr, this, intro);
  }

  public void log() {
    AriaJavaJNI.ArMapObject_log__SWIG_1(swigCPtr, this);
  }

  public String getFileName() {
    return AriaJavaJNI.ArMapObject_getFileName(swigCPtr, this);
  }

  public final static class ArgIndex {
    public final static ArMapObject.ArgIndex TYPE_ARG_INDEX = new ArMapObject.ArgIndex("TYPE_ARG_INDEX", AriaJavaJNI.ArMapObject_TYPE_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex POSE_X_ARG_INDEX = new ArMapObject.ArgIndex("POSE_X_ARG_INDEX", AriaJavaJNI.ArMapObject_POSE_X_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex POSE_Y_ARG_INDEX = new ArMapObject.ArgIndex("POSE_Y_ARG_INDEX", AriaJavaJNI.ArMapObject_POSE_Y_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex TH_ARG_INDEX = new ArMapObject.ArgIndex("TH_ARG_INDEX", AriaJavaJNI.ArMapObject_TH_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex DESC_ARG_INDEX = new ArMapObject.ArgIndex("DESC_ARG_INDEX", AriaJavaJNI.ArMapObject_DESC_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex ICON_ARG_INDEX = new ArMapObject.ArgIndex("ICON_ARG_INDEX", AriaJavaJNI.ArMapObject_ICON_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex NAME_ARG_INDEX = new ArMapObject.ArgIndex("NAME_ARG_INDEX", AriaJavaJNI.ArMapObject_NAME_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex LAST_POSE_ARG_INDEX = new ArMapObject.ArgIndex("LAST_POSE_ARG_INDEX", AriaJavaJNI.ArMapObject_LAST_POSE_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex FROM_X_ARG_INDEX = new ArMapObject.ArgIndex("FROM_X_ARG_INDEX", AriaJavaJNI.ArMapObject_FROM_X_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex FROM_Y_ARG_INDEX = new ArMapObject.ArgIndex("FROM_Y_ARG_INDEX", AriaJavaJNI.ArMapObject_FROM_Y_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex TO_X_ARG_INDEX = new ArMapObject.ArgIndex("TO_X_ARG_INDEX", AriaJavaJNI.ArMapObject_TO_X_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex TO_Y_ARG_INDEX = new ArMapObject.ArgIndex("TO_Y_ARG_INDEX", AriaJavaJNI.ArMapObject_TO_Y_ARG_INDEX_get());
    public final static ArMapObject.ArgIndex LAST_ARG_INDEX = new ArMapObject.ArgIndex("LAST_ARG_INDEX", AriaJavaJNI.ArMapObject_LAST_ARG_INDEX_get());

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static ArgIndex swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + ArgIndex.class + " with value " + swigValue);
    }

    private ArgIndex(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private ArgIndex(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private ArgIndex(String swigName, ArgIndex swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static ArgIndex[] swigValues = { TYPE_ARG_INDEX, POSE_X_ARG_INDEX, POSE_Y_ARG_INDEX, TH_ARG_INDEX, DESC_ARG_INDEX, ICON_ARG_INDEX, NAME_ARG_INDEX, LAST_POSE_ARG_INDEX, FROM_X_ARG_INDEX, FROM_Y_ARG_INDEX, TO_X_ARG_INDEX, TO_Y_ARG_INDEX, LAST_ARG_INDEX };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static int ARG_INDEX_COUNT = AriaJavaJNI.ArMapObject_ARG_INDEX_COUNT_get();

}
